<?xml version="1.0" encoding="ascii"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
          "DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
  <title>s3.service</title>
  <link rel="stylesheet" href="epydoc.css" type="text/css" />
  <script type="text/javascript" src="epydoc.js"></script>
</head>

<body bgcolor="white" text="black" link="blue" vlink="#204080"
      alink="#204080">
<!-- ==================== NAVIGATION BAR ==================== -->
<table class="navbar" border="0" width="100%" cellpadding="0"
       bgcolor="#a0c0ff" cellspacing="0">
  <tr valign="middle">
  <!-- Home link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="s3-module.html">Home</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Tree link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="module-tree.html">Trees</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Index link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="identifier-index.html">Indices</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Help link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="help.html">Help</a>&nbsp;&nbsp;&nbsp;</th>

      <th class="navbar" width="100%"></th>
  </tr>
</table>
<table width="100%" cellpadding="0" cellspacing="0">
  <tr valign="top">
    <td width="100%">
      <span class="breadcrumbs">
        <a href="s3-module.html">Package&nbsp;s3</a> ::
        Module&nbsp;service
      </span>
    </td>
    <td>
      <table cellpadding="0" cellspacing="0">
        <!-- hide/show private -->
        <tr><td align="right"><span class="options">[<a href="javascript:void(0);" class="privatelink"
    onclick="toggle_private();">hide private</a>]</span></td></tr>
        <tr><td align="right"><span class="options"
            >[<a href="frames.html" target="_top">frames</a
            >]&nbsp;|&nbsp;<a href="s3.service-pysrc.html"
            target="_top">no&nbsp;frames</a>]</span></td></tr>
      </table>
    </td>
  </tr>
</table>
<h1 class="epydoc">Source Code for <a href="s3.service-module.html">Module s3.service</a></h1>
<pre class="py-src">
<tt class="py-lineno">  1</tt>  <tt class="py-line"><tt class="py-keyword">from</tt> <tt id="link-0" class="py-name" targets="Package s3=s3-module.html"><a title="s3" class="py-name" href="#" onclick="return doclink('link-0', 's3', 'link-0');">s3</a></tt></tt><tt class="py-op">.</tt><tt id="link-1" class="py-name" targets="Module s3.connection=s3.connection-module.html"><a title="s3.connection" class="py-name" href="#" onclick="return doclink('link-1', 'connection', 'link-1');">connection</a></tt></tt> <tt class="py-keyword">import</tt> <tt id="link-2" class="py-name" targets="Class s3.connection.S3Connection=s3.connection.S3Connection-class.html"><a title="s3.connection.S3Connection" class="py-name" href="#" onclick="return doclink('link-2', 'S3Connection', 'link-2');">S3Connection</a></tt></tt> </tt>
<tt class="py-lineno">  2</tt>  <tt class="py-line"><tt class="py-keyword">from</tt> <tt id="link-3" class="py-name"><a title="s3" class="py-name" href="#" onclick="return doclink('link-3', 's3', 'link-0');">s3</a></tt></tt><tt class="py-op">.</tt><tt id="link-4" class="py-name" targets="Module s3.objects=s3.objects-module.html"><a title="s3.objects" class="py-name" href="#" onclick="return doclink('link-4', 'objects', 'link-4');">objects</a></tt></tt> <tt class="py-keyword">import</tt> <tt id="link-5" class="py-name" targets="Class s3.objects.S3Bucket=s3.objects.S3Bucket-class.html"><a title="s3.objects.S3Bucket" class="py-name" href="#" onclick="return doclink('link-5', 'S3Bucket', 'link-5');">S3Bucket</a></tt></tt> </tt>
<tt class="py-lineno">  3</tt>  <tt class="py-line"><tt class="py-keyword">from</tt> <tt id="link-6" class="py-name"><a title="s3" class="py-name" href="#" onclick="return doclink('link-6', 's3', 'link-0');">s3</a></tt></tt><tt class="py-op">.</tt><tt id="link-7" class="py-name" targets="Module s3.parsers=s3.parsers-module.html"><a title="s3.parsers" class="py-name" href="#" onclick="return doclink('link-7', 'parsers', 'link-7');">parsers</a></tt></tt> <tt class="py-keyword">import</tt> <tt id="link-8" class="py-name" targets="Function s3.parsers.parseListBuckets()=s3.parsers-module.html#parseListBuckets"><a title="s3.parsers.parseListBuckets" class="py-name" href="#" onclick="return doclink('link-8', 'parseListBuckets', 'link-8');">parseListBuckets</a></tt></tt><tt class="py-op">,</tt> <tt id="link-9" class="py-name" targets="Function s3.parsers.parseGetBucket()=s3.parsers-module.html#parseGetBucket"><a title="s3.parsers.parseGetBucket" class="py-name" href="#" onclick="return doclink('link-9', 'parseGetBucket', 'link-9');">parseGetBucket</a></tt></tt><tt class="py-op">,</tt> <tt id="link-10" class="py-name" targets="Function s3.parsers.parseGetBucketNames()=s3.parsers-module.html#parseGetBucketNames"><a title="s3.parsers.parseGetBucketNames" class="py-name" href="#" onclick="return doclink('link-10', 'parseGetBucketNames', 'link-10');">parseGetBucketNames</a></tt></tt> </tt>
<tt class="py-lineno">  4</tt>  <tt class="py-line"> </tt>
<a name="S3Service"></a><div id="S3Service-def"><tt class="py-lineno">  5</tt> <a class="py-toggle" href="#" id="S3Service-toggle" onclick="return toggle('S3Service');">-</a><tt class="py-line"><tt class="py-keyword">class</tt> <a class="py-def-name" href="s3.service.S3Service-class.html">S3Service</a><tt class="py-op">(</tt><tt class="py-base-class">object</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
</div><div id="S3Service-collapsed" style="display:none;" pad="+++" indent="++++"></div><div id="S3Service-expanded"><tt class="py-lineno">  6</tt>  <tt class="py-line">    <tt class="py-docstring">"""</tt> </tt>
<tt class="py-lineno">  7</tt>  <tt class="py-line"><tt class="py-docstring">    S3 Service class.</tt> </tt>
<tt class="py-lineno">  8</tt>  <tt class="py-line"><tt class="py-docstring">    </tt> </tt>
<tt class="py-lineno">  9</tt>  <tt class="py-line"><tt class="py-docstring">    Behaves like a dictionary of buckets, with some additional functions.</tt> </tt>
<tt class="py-lineno"> 10</tt>  <tt class="py-line"><tt class="py-docstring">    """</tt> </tt>
<tt class="py-lineno"> 11</tt>  <tt class="py-line">     </tt>
<a name="S3Service.__init__"></a><div id="S3Service.__init__-def"><tt class="py-lineno"> 12</tt> <a class="py-toggle" href="#" id="S3Service.__init__-toggle" onclick="return toggle('S3Service.__init__');">-</a><tt class="py-line">    <tt class="py-keyword">def</tt> <a class="py-def-name" href="s3.service.S3Service-class.html#__init__">__init__</a><tt class="py-op">(</tt><tt class="py-param">self</tt><tt class="py-op">,</tt> <tt class="py-param">pub_key</tt><tt class="py-op">,</tt> <tt class="py-param">priv_key</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
</div><div id="S3Service.__init__-collapsed" style="display:none;" pad="+++" indent="++++++++"></div><div id="S3Service.__init__-expanded"><tt class="py-lineno"> 13</tt>  <tt class="py-line">        <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">_s3_conn</tt> <tt class="py-op">=</tt> <tt id="link-11" class="py-name"><a title="s3.connection.S3Connection" class="py-name" href="#" onclick="return doclink('link-11', 'S3Connection', 'link-2');">S3Connection</a></tt></tt><tt class="py-op">(</tt><tt class="py-name">pub_key</tt><tt class="py-op">,</tt> <tt class="py-name">priv_key</tt><tt class="py-op">)</tt> </tt>
</div><tt class="py-lineno"> 14</tt>  <tt class="py-line"> </tt>
<a name="S3Service.get"></a><div id="S3Service.get-def"><tt class="py-lineno"> 15</tt> <a class="py-toggle" href="#" id="S3Service.get-toggle" onclick="return toggle('S3Service.get');">-</a><tt class="py-line">    <tt class="py-keyword">def</tt> <a class="py-def-name" href="s3.service.S3Service-class.html#get">get</a><tt class="py-op">(</tt><tt class="py-param">self</tt><tt class="py-op">,</tt> <tt class="py-param">name</tt><tt class="py-op">,</tt> <tt class="py-param">default</tt><tt class="py-op">=</tt><tt class="py-name">None</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
</div><div id="S3Service.get-collapsed" style="display:none;" pad="+++" indent="++++++++"></div><div id="S3Service.get-expanded"><tt class="py-lineno"> 16</tt>  <tt class="py-line">        <tt class="py-docstring">"""</tt> </tt>
<tt class="py-lineno"> 17</tt>  <tt class="py-line"><tt class="py-docstring">        Get bucket with the exact name.</tt> </tt>
<tt class="py-lineno"> 18</tt>  <tt class="py-line"><tt class="py-docstring">        </tt> </tt>
<tt class="py-lineno"> 19</tt>  <tt class="py-line"><tt class="py-docstring">        @param name: The name of the bucket</tt> </tt>
<tt class="py-lineno"> 20</tt>  <tt class="py-line"><tt class="py-docstring">        @type  name: string</tt> </tt>
<tt class="py-lineno"> 21</tt>  <tt class="py-line"><tt class="py-docstring">        @return:     Bucket if exists, else None</tt> </tt>
<tt class="py-lineno"> 22</tt>  <tt class="py-line"><tt class="py-docstring">        @rtype:      S3Bucket or None</tt> </tt>
<tt class="py-lineno"> 23</tt>  <tt class="py-line"><tt class="py-docstring">        """</tt> </tt>
<tt class="py-lineno"> 24</tt>  <tt class="py-line">        <tt class="py-name">response</tt> <tt class="py-op">=</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">_s3_conn</tt><tt class="py-op">.</tt><tt id="link-12" class="py-name" targets="Method s3.connection.S3Connection.clone()=s3.connection.S3Connection-class.html#clone"><a title="s3.connection.S3Connection.clone" class="py-name" href="#" onclick="return doclink('link-12', 'clone', 'link-12');">clone</a></tt></tt><tt class="py-op">(</tt><tt class="py-op">)</tt><tt class="py-op">.</tt><tt id="link-13" class="py-name" targets="Method s3.generator.S3Generator.get()=s3.generator.S3Generator-class.html#get,Method s3.objects.S3Bucket.get()=s3.objects.S3Bucket-class.html#get,Method s3.service.S3Service.get()=s3.service.S3Service-class.html#get"><a title="s3.generator.S3Generator.get
s3.objects.S3Bucket.get
s3.service.S3Service.get" class="py-name" href="#" onclick="return doclink('link-13', 'get', 'link-13');">get</a></tt></tt><tt class="py-op">(</tt><tt class="py-op">)</tt> </tt>
<tt class="py-lineno"> 25</tt>  <tt class="py-line">        <tt class="py-keyword">return</tt> <tt id="link-14" class="py-name"><a title="s3.parsers.parseGetBucket" class="py-name" href="#" onclick="return doclink('link-14', 'parseGetBucket', 'link-9');">parseGetBucket</a></tt></tt><tt class="py-op">(</tt><tt class="py-name">name</tt><tt class="py-op">,</tt> <tt class="py-name">response</tt><tt class="py-op">.</tt><tt class="py-name">read</tt><tt class="py-op">(</tt><tt class="py-op">)</tt><tt class="py-op">,</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">_s3_conn</tt><tt class="py-op">,</tt> <tt class="py-name">default</tt><tt class="py-op">)</tt> </tt>
</div><tt class="py-lineno"> 26</tt>  <tt class="py-line"> </tt>
<a name="S3Service.list"></a><div id="S3Service.list-def"><tt class="py-lineno"> 27</tt> <a class="py-toggle" href="#" id="S3Service.list-toggle" onclick="return toggle('S3Service.list');">-</a><tt class="py-line">    <tt class="py-keyword">def</tt> <a class="py-def-name" href="s3.service.S3Service-class.html#list">list</a><tt class="py-op">(</tt><tt class="py-param">self</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
</div><div id="S3Service.list-collapsed" style="display:none;" pad="+++" indent="++++++++"></div><div id="S3Service.list-expanded"><tt class="py-lineno"> 28</tt>  <tt class="py-line">        <tt class="py-docstring">"""</tt> </tt>
<tt class="py-lineno"> 29</tt>  <tt class="py-line"><tt class="py-docstring">        List all buckets.</tt> </tt>
<tt class="py-lineno"> 30</tt>  <tt class="py-line"><tt class="py-docstring">        </tt> </tt>
<tt class="py-lineno"> 31</tt>  <tt class="py-line"><tt class="py-docstring">        @return:       List of buckets associated with the authenticated user</tt> </tt>
<tt class="py-lineno"> 32</tt>  <tt class="py-line"><tt class="py-docstring">        @rtype:        list</tt> </tt>
<tt class="py-lineno"> 33</tt>  <tt class="py-line"><tt class="py-docstring">        """</tt> </tt>
<tt class="py-lineno"> 34</tt>  <tt class="py-line">        <tt class="py-name">response</tt> <tt class="py-op">=</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">_s3_conn</tt><tt class="py-op">.</tt><tt id="link-15" class="py-name"><a title="s3.connection.S3Connection.clone" class="py-name" href="#" onclick="return doclink('link-15', 'clone', 'link-12');">clone</a></tt></tt><tt class="py-op">(</tt><tt class="py-op">)</tt><tt class="py-op">.</tt><tt id="link-16" class="py-name"><a title="s3.generator.S3Generator.get
s3.objects.S3Bucket.get
s3.service.S3Service.get" class="py-name" href="#" onclick="return doclink('link-16', 'get', 'link-13');">get</a></tt></tt><tt class="py-op">(</tt><tt class="py-op">)</tt> </tt>
<tt class="py-lineno"> 35</tt>  <tt class="py-line">        <tt class="py-keyword">return</tt> <tt id="link-17" class="py-name"><a title="s3.parsers.parseListBuckets" class="py-name" href="#" onclick="return doclink('link-17', 'parseListBuckets', 'link-8');">parseListBuckets</a></tt></tt><tt class="py-op">(</tt><tt class="py-name">response</tt><tt class="py-op">.</tt><tt class="py-name">read</tt><tt class="py-op">(</tt><tt class="py-op">)</tt><tt class="py-op">,</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">_s3_conn</tt><tt class="py-op">)</tt> </tt>
</div><tt class="py-lineno"> 36</tt>  <tt class="py-line"> </tt>
<a name="S3Service.create"></a><div id="S3Service.create-def"><tt class="py-lineno"> 37</tt> <a class="py-toggle" href="#" id="S3Service.create-toggle" onclick="return toggle('S3Service.create');">-</a><tt class="py-line">    <tt class="py-keyword">def</tt> <a class="py-def-name" href="s3.service.S3Service-class.html#create">create</a><tt class="py-op">(</tt><tt class="py-param">self</tt><tt class="py-op">,</tt> <tt class="py-param">name</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
</div><div id="S3Service.create-collapsed" style="display:none;" pad="+++" indent="++++++++"></div><div id="S3Service.create-expanded"><tt class="py-lineno"> 38</tt>  <tt class="py-line">        <tt class="py-docstring">"""</tt> </tt>
<tt class="py-lineno"> 39</tt>  <tt class="py-line"><tt class="py-docstring">        Create a bucket.</tt> </tt>
<tt class="py-lineno"> 40</tt>  <tt class="py-line"><tt class="py-docstring">        </tt> </tt>
<tt class="py-lineno"> 41</tt>  <tt class="py-line"><tt class="py-docstring">        @param name: Name for the new bucket</tt> </tt>
<tt class="py-lineno"> 42</tt>  <tt class="py-line"><tt class="py-docstring">        @type  name: string</tt> </tt>
<tt class="py-lineno"> 43</tt>  <tt class="py-line"><tt class="py-docstring">        @return:     Returns the newly created bucket</tt> </tt>
<tt class="py-lineno"> 44</tt>  <tt class="py-line"><tt class="py-docstring">        @rtype:      S3Bucket</tt> </tt>
<tt class="py-lineno"> 45</tt>  <tt class="py-line"><tt class="py-docstring">        """</tt> </tt>
<tt class="py-lineno"> 46</tt>  <tt class="py-line">        <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">_s3_conn</tt><tt class="py-op">.</tt><tt id="link-18" class="py-name"><a title="s3.connection.S3Connection.clone" class="py-name" href="#" onclick="return doclink('link-18', 'clone', 'link-12');">clone</a></tt></tt><tt class="py-op">(</tt><tt class="py-op">)</tt><tt class="py-op">.</tt><tt id="link-19" class="py-name" targets="Method s3.generator.S3Generator.put()=s3.generator.S3Generator-class.html#put"><a title="s3.generator.S3Generator.put" class="py-name" href="#" onclick="return doclink('link-19', 'put', 'link-19');">put</a></tt></tt><tt class="py-op">(</tt><tt class="py-name">name</tt><tt class="py-op">)</tt> </tt>
<tt class="py-lineno"> 47</tt>  <tt class="py-line">        <tt class="py-keyword">return</tt> <tt id="link-20" class="py-name"><a title="s3.objects.S3Bucket" class="py-name" href="#" onclick="return doclink('link-20', 'S3Bucket', 'link-5');">S3Bucket</a></tt></tt><tt class="py-op">(</tt><tt class="py-name">name</tt><tt class="py-op">,</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">_s3_conn</tt><tt class="py-op">)</tt> </tt>
</div><tt class="py-lineno"> 48</tt>  <tt class="py-line"> </tt>
<tt class="py-lineno"> 49</tt>  <tt class="py-line"> </tt>
<a name="S3Service.delete"></a><div id="S3Service.delete-def"><tt class="py-lineno"> 50</tt> <a class="py-toggle" href="#" id="S3Service.delete-toggle" onclick="return toggle('S3Service.delete');">-</a><tt class="py-line">    <tt class="py-keyword">def</tt> <a class="py-def-name" href="s3.service.S3Service-class.html#delete">delete</a><tt class="py-op">(</tt><tt class="py-param">self</tt><tt class="py-op">,</tt> <tt class="py-param">name</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
</div><div id="S3Service.delete-collapsed" style="display:none;" pad="+++" indent="++++++++"></div><div id="S3Service.delete-expanded"><tt class="py-lineno"> 51</tt>  <tt class="py-line">        <tt class="py-docstring">"""</tt> </tt>
<tt class="py-lineno"> 52</tt>  <tt class="py-line"><tt class="py-docstring">        Deletes a bucket.</tt> </tt>
<tt class="py-lineno"> 53</tt>  <tt class="py-line"><tt class="py-docstring">        </tt> </tt>
<tt class="py-lineno"> 54</tt>  <tt class="py-line"><tt class="py-docstring">        @param name: Name of the queue that should be deleted</tt> </tt>
<tt class="py-lineno"> 55</tt>  <tt class="py-line"><tt class="py-docstring">        @type  name: string</tt> </tt>
<tt class="py-lineno"> 56</tt>  <tt class="py-line"><tt class="py-docstring">        """</tt> </tt>
<tt class="py-lineno"> 57</tt>  <tt class="py-line">        <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">_s3_conn</tt><tt class="py-op">.</tt><tt id="link-21" class="py-name"><a title="s3.connection.S3Connection.clone" class="py-name" href="#" onclick="return doclink('link-21', 'clone', 'link-12');">clone</a></tt></tt><tt class="py-op">(</tt><tt class="py-op">)</tt><tt class="py-op">.</tt><tt id="link-22" class="py-name" targets="Method s3.generator.S3Generator.delete()=s3.generator.S3Generator-class.html#delete,Method s3.objects.S3Bucket.delete()=s3.objects.S3Bucket-class.html#delete,Method s3.objects.S3Object.delete()=s3.objects.S3Object-class.html#delete,Method s3.service.S3Service.delete()=s3.service.S3Service-class.html#delete"><a title="s3.generator.S3Generator.delete
s3.objects.S3Bucket.delete
s3.objects.S3Object.delete
s3.service.S3Service.delete" class="py-name" href="#" onclick="return doclink('link-22', 'delete', 'link-22');">delete</a></tt></tt><tt class="py-op">(</tt><tt class="py-name">name</tt><tt class="py-op">)</tt> </tt>
</div><tt class="py-lineno"> 58</tt>  <tt class="py-line"> </tt>
<tt class="py-lineno"> 59</tt>  <tt class="py-line"> </tt>
<a name="S3Service.keys"></a><div id="S3Service.keys-def"><tt class="py-lineno"> 60</tt> <a class="py-toggle" href="#" id="S3Service.keys-toggle" onclick="return toggle('S3Service.keys');">-</a><tt class="py-line">    <tt class="py-keyword">def</tt> <a class="py-def-name" href="s3.service.S3Service-class.html#keys">keys</a><tt class="py-op">(</tt><tt class="py-param">self</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
</div><div id="S3Service.keys-collapsed" style="display:none;" pad="+++" indent="++++++++"></div><div id="S3Service.keys-expanded"><tt class="py-lineno"> 61</tt>  <tt class="py-line">        <tt class="py-docstring">"""</tt> </tt>
<tt class="py-lineno"> 62</tt>  <tt class="py-line"><tt class="py-docstring">        Returns a flat list of bucket names.</tt> </tt>
<tt class="py-lineno"> 63</tt>  <tt class="py-line"><tt class="py-docstring">        </tt> </tt>
<tt class="py-lineno"> 64</tt>  <tt class="py-line"><tt class="py-docstring">        @return: List of bucket names</tt> </tt>
<tt class="py-lineno"> 65</tt>  <tt class="py-line"><tt class="py-docstring">        @rtype:  list</tt> </tt>
<tt class="py-lineno"> 66</tt>  <tt class="py-line"><tt class="py-docstring">        """</tt> </tt>
<tt class="py-lineno"> 67</tt>  <tt class="py-line">        <tt class="py-name">response</tt> <tt class="py-op">=</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">_s3_conn</tt><tt class="py-op">.</tt><tt id="link-23" class="py-name"><a title="s3.connection.S3Connection.clone" class="py-name" href="#" onclick="return doclink('link-23', 'clone', 'link-12');">clone</a></tt></tt><tt class="py-op">(</tt><tt class="py-op">)</tt><tt class="py-op">.</tt><tt id="link-24" class="py-name"><a title="s3.generator.S3Generator.get
s3.objects.S3Bucket.get
s3.service.S3Service.get" class="py-name" href="#" onclick="return doclink('link-24', 'get', 'link-13');">get</a></tt></tt><tt class="py-op">(</tt><tt class="py-op">)</tt> </tt>
<tt class="py-lineno"> 68</tt>  <tt class="py-line">        <tt class="py-keyword">return</tt> <tt id="link-25" class="py-name"><a title="s3.parsers.parseGetBucketNames" class="py-name" href="#" onclick="return doclink('link-25', 'parseGetBucketNames', 'link-10');">parseGetBucketNames</a></tt></tt><tt class="py-op">(</tt><tt class="py-name">response</tt><tt class="py-op">.</tt><tt class="py-name">read</tt><tt class="py-op">(</tt><tt class="py-op">)</tt><tt class="py-op">)</tt> </tt>
</div><tt class="py-lineno"> 69</tt>  <tt class="py-line">         </tt>
<tt class="py-lineno"> 70</tt>  <tt class="py-line">    <tt class="py-name">values</tt> <tt class="py-op">=</tt> <tt id="link-26" class="py-name" targets="Method s3.objects.S3Bucket.list()=s3.objects.S3Bucket-class.html#list,Method s3.service.S3Service.list()=s3.service.S3Service-class.html#list"><a title="s3.objects.S3Bucket.list
s3.service.S3Service.list" class="py-name" href="#" onclick="return doclink('link-26', 'list', 'link-26');">list</a></tt></tt> </tt>
<tt class="py-lineno"> 71</tt>  <tt class="py-line"> </tt>
<a name="S3Service.items"></a><div id="S3Service.items-def"><tt class="py-lineno"> 72</tt> <a class="py-toggle" href="#" id="S3Service.items-toggle" onclick="return toggle('S3Service.items');">-</a><tt class="py-line">    <tt class="py-keyword">def</tt> <a class="py-def-name" href="s3.service.S3Service-class.html#items">items</a><tt class="py-op">(</tt><tt class="py-param">self</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
</div><div id="S3Service.items-collapsed" style="display:none;" pad="+++" indent="++++++++"></div><div id="S3Service.items-expanded"><tt class="py-lineno"> 73</tt>  <tt class="py-line">        <tt class="py-docstring">"""</tt> </tt>
<tt class="py-lineno"> 74</tt>  <tt class="py-line"><tt class="py-docstring">        Returns (key, value) pairs, where, keys are bucket names, and values are S3Buckets.</tt> </tt>
<tt class="py-lineno"> 75</tt>  <tt class="py-line"><tt class="py-docstring">        </tt> </tt>
<tt class="py-lineno"> 76</tt>  <tt class="py-line"><tt class="py-docstring">        @return: List of (bucket name, bucket) pairs</tt> </tt>
<tt class="py-lineno"> 77</tt>  <tt class="py-line"><tt class="py-docstring">        @rtype:  list</tt> </tt>
<tt class="py-lineno"> 78</tt>  <tt class="py-line"><tt class="py-docstring">        """</tt> </tt>
<tt class="py-lineno"> 79</tt>  <tt class="py-line">        <tt class="py-keyword">return</tt> <tt class="py-name">zip</tt><tt class="py-op">(</tt><tt class="py-name">self</tt><tt class="py-op">.</tt><tt id="link-27" class="py-name" targets="Method s3.objects.S3Bucket.keys()=s3.objects.S3Bucket-class.html#keys,Method s3.service.S3Service.keys()=s3.service.S3Service-class.html#keys"><a title="s3.objects.S3Bucket.keys
s3.service.S3Service.keys" class="py-name" href="#" onclick="return doclink('link-27', 'keys', 'link-27');">keys</a></tt></tt><tt class="py-op">(</tt><tt class="py-op">)</tt><tt class="py-op">,</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt id="link-28" class="py-name"><a title="s3.objects.S3Bucket.list
s3.service.S3Service.list" class="py-name" href="#" onclick="return doclink('link-28', 'list', 'link-26');">list</a></tt></tt><tt class="py-op">(</tt><tt class="py-op">)</tt><tt class="py-op">)</tt> </tt>
</div><tt class="py-lineno"> 80</tt>  <tt class="py-line"> </tt>
<tt class="py-lineno"> 81</tt>  <tt class="py-line"> </tt>
<a name="S3Service.has_key"></a><div id="S3Service.has_key-def"><tt class="py-lineno"> 82</tt> <a class="py-toggle" href="#" id="S3Service.has_key-toggle" onclick="return toggle('S3Service.has_key');">-</a><tt class="py-line">    <tt class="py-keyword">def</tt> <a class="py-def-name" href="s3.service.S3Service-class.html#has_key">has_key</a><tt class="py-op">(</tt><tt class="py-param">self</tt><tt class="py-op">,</tt> <tt class="py-param">key</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
</div><div id="S3Service.has_key-collapsed" style="display:none;" pad="+++" indent="++++++++"></div><div id="S3Service.has_key-expanded"><tt class="py-lineno"> 83</tt>  <tt class="py-line">        <tt class="py-docstring">"""</tt> </tt>
<tt class="py-lineno"> 84</tt>  <tt class="py-line"><tt class="py-docstring">        Does bucket exist.</tt> </tt>
<tt class="py-lineno"> 85</tt>  <tt class="py-line"><tt class="py-docstring">        """</tt> </tt>
<tt class="py-lineno"> 86</tt>  <tt class="py-line">        <tt class="py-keyword">return</tt> <tt class="py-name">key</tt> <tt class="py-keyword">in</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt id="link-29" class="py-name"><a title="s3.objects.S3Bucket.keys
s3.service.S3Service.keys" class="py-name" href="#" onclick="return doclink('link-29', 'keys', 'link-27');">keys</a></tt></tt><tt class="py-op">(</tt><tt class="py-op">)</tt> </tt>
</div><tt class="py-lineno"> 87</tt>  <tt class="py-line"> </tt>
<tt class="py-lineno"> 88</tt>  <tt class="py-line"> </tt>
<a name="S3Service.__getitem__"></a><div id="S3Service.__getitem__-def"><tt class="py-lineno"> 89</tt> <a class="py-toggle" href="#" id="S3Service.__getitem__-toggle" onclick="return toggle('S3Service.__getitem__');">-</a><tt class="py-line">    <tt class="py-keyword">def</tt> <a class="py-def-name" href="s3.service.S3Service-class.html#__getitem__">__getitem__</a><tt class="py-op">(</tt><tt class="py-param">self</tt><tt class="py-op">,</tt> <tt class="py-param">key</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
</div><div id="S3Service.__getitem__-collapsed" style="display:none;" pad="+++" indent="++++++++"></div><div id="S3Service.__getitem__-expanded"><tt class="py-lineno"> 90</tt>  <tt class="py-line">        <tt class="py-docstring">"""</tt> </tt>
<tt class="py-lineno"> 91</tt>  <tt class="py-line"><tt class="py-docstring">        Get a bucket instance.</tt> </tt>
<tt class="py-lineno"> 92</tt>  <tt class="py-line"><tt class="py-docstring">        """</tt> </tt>
<tt class="py-lineno"> 93</tt>  <tt class="py-line">        <tt class="py-keyword">return</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt id="link-30" class="py-name"><a title="s3.generator.S3Generator.get
s3.objects.S3Bucket.get
s3.service.S3Service.get" class="py-name" href="#" onclick="return doclink('link-30', 'get', 'link-13');">get</a></tt></tt><tt class="py-op">(</tt><tt class="py-name">key</tt><tt class="py-op">)</tt> </tt>
</div><tt class="py-lineno"> 94</tt>  <tt class="py-line"> </tt>
<tt class="py-lineno"> 95</tt>  <tt class="py-line"> </tt>
<a name="S3Service.__delitem__"></a><div id="S3Service.__delitem__-def"><tt class="py-lineno"> 96</tt> <a class="py-toggle" href="#" id="S3Service.__delitem__-toggle" onclick="return toggle('S3Service.__delitem__');">-</a><tt class="py-line">    <tt class="py-keyword">def</tt> <a class="py-def-name" href="s3.service.S3Service-class.html#__delitem__">__delitem__</a><tt class="py-op">(</tt><tt class="py-param">self</tt><tt class="py-op">,</tt> <tt class="py-param">key</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
</div><div id="S3Service.__delitem__-collapsed" style="display:none;" pad="+++" indent="++++++++"></div><div id="S3Service.__delitem__-expanded"><tt class="py-lineno"> 97</tt>  <tt class="py-line">        <tt class="py-docstring">"""</tt> </tt>
<tt class="py-lineno"> 98</tt>  <tt class="py-line"><tt class="py-docstring">        Deletes a bucket</tt> </tt>
<tt class="py-lineno"> 99</tt>  <tt class="py-line"><tt class="py-docstring">        """</tt> </tt>
<tt class="py-lineno">100</tt>  <tt class="py-line">        <tt class="py-name">self</tt><tt class="py-op">.</tt><tt id="link-31" class="py-name"><a title="s3.generator.S3Generator.delete
s3.objects.S3Bucket.delete
s3.objects.S3Object.delete
s3.service.S3Service.delete" class="py-name" href="#" onclick="return doclink('link-31', 'delete', 'link-22');">delete</a></tt></tt><tt class="py-op">(</tt><tt class="py-name">key</tt><tt class="py-op">)</tt> </tt>
</div></div><tt class="py-lineno">101</tt>  <tt class="py-line"> </tt><script type="text/javascript">
<!--
expandto(location.href);
// -->
</script>
</pre>
<br />
<!-- ==================== NAVIGATION BAR ==================== -->
<table class="navbar" border="0" width="100%" cellpadding="0"
       bgcolor="#a0c0ff" cellspacing="0">
  <tr valign="middle">
  <!-- Home link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="s3-module.html">Home</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Tree link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="module-tree.html">Trees</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Index link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="identifier-index.html">Indices</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Help link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="help.html">Help</a>&nbsp;&nbsp;&nbsp;</th>

      <th class="navbar" width="100%"></th>
  </tr>
</table>
<table border="0" cellpadding="0" cellspacing="0" width="100%%">
  <tr>
    <td align="left" class="footer">Generated by Epydoc
        3.0alpha3 on Wed Sep 20 12:10:44 2006</td>
    <td align="right" class="footer">
      <a href="http://epydoc.sourceforge.net">http://epydoc.sourceforge.net</a>
    </td>
  </tr>
</table>

<script type="text/javascript">
  <!--
  // Private objects are initially displayed (because if
  // javascript is turned off then we want them to be
  // visible); but by default, we want to hide them.  So hide
  // them unless we have a cookie that says to show them.
  checkCookie()
  // -->
</script>
  
</body>
</html>
